QT       += core gui
QT += xml

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    myQgsMapCanvas.cpp

HEADERS += \
    LayerCheckBoxDelegate.h \
    mainwindow.h \
    myQgsMapCanvas.h

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

# # 设置 QGIS 库的路径
# INCLUDEPATH += /usr/local/include/qgis
# LIBS += -L/usr/loacal/lib -lqgis_core -lqgis_gui
# # 添加QGIS的插件路径
# LIBS += -L/usr/lib/qgis/plugins
# 设置 Qt 5 的路径（如果不是默认路径）
# QMAKE_CXXFLAGS += -I/usr/include/x86_64-linux-gnu/qt5

# 包含 QGIS 的库和头文件
INCLUDEPATH += /usr/local/include/qgis
LIBS += -L/usr/local/lib -lqgis_core -lqgis_gui

# 包含 Qwt（如果你需要）
INCLUDEPATH += /usr/local/qwt-6.0.0/include
LIBS += -L/usr/local/qwt-6.0.0/lib -lqwt

# 包含 GDAL（QGIS 依赖于 GDAL）
INCLUDEPATH += /usr/local/gdal-new/include
LIBS += -L/usr/local/gdal-new/lib -lgdal
